home *** CD-ROM | disk | FTP | other *** search
Java Source | 2004-01-31 | 628 b | 12 lines |
- class TestClass {
- public static void main(String[] args) throws Exception {
- Class test = Class.forName("java.lang.Exception");
- System.out.println("Classname: " + test.getName());
- System.out.println("Superclass name: " + test.getSuperclass().getName());
- Class[] interf = test.getSuperclass().getInterfaces();
- System.out.println("Implements " + interf.length + " interfaces");
- for(int i=0; i<interf.length; i++)
- System.out.println("Interface " + (i+1) + " = " + interf[i].getName());
- // Object instance = test.getInstance();
- }
- }